#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main()
{
	int x = 0;
	int count = 0;
	scanf("%d", &x);
	int arr[3] = { 2,3,7 };
	int i = 0;
	for (i = 0; i < 3; i++)
	{
		if (x % arr[i] == 0)
		{
			printf("%d ", arr[i]);
			count++;
		}
	}
	if (count == 0)
	{
		printf("n");
	}
	return 0;
}int main() {
